package fr.excilys.gwt.events.client.event;

import com.google.gwt.event.shared.GwtEvent;

public class AddPhoneNumberEvent extends GwtEvent<AddPhoneNumberHandler> {

	private static final Type<AddPhoneNumberHandler> TYPE = new Type<AddPhoneNumberHandler>();

	private String phoneNumber;

	public AddPhoneNumberEvent(String phoneNumber) {
		super();
		this.phoneNumber = phoneNumber;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	@Override
	protected void dispatch(AddPhoneNumberHandler handler) {
		handler.onAddPhoneNumber(this);
	}

	@Override
	public Type<AddPhoneNumberHandler> getAssociatedType() {
		return TYPE;
	}

	public static Type<AddPhoneNumberHandler> getType() {
		return TYPE;
	}
}
